package com.ajx.blog.entity;

import java.io.Serializable;
import java.time.LocalDate;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import org.springframework.format.annotation.DateTimeFormat;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/*
 * @Author: 姜东浩
 * @Date: 2022-04-22 23:52:23
 * 
 * @Description: 博客用户类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "blogusers")
public class Blogusers implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "uid", type = IdType.AUTO)
    private Integer uid; // 用户主键id

    @TableField(value = "uphone")
    private String uphone; // 用户手机号

    @TableField(value = "upass")
    private String upass; // 用户密码

    @TableField(value = "uname")
    private String uname; // 用户账号

    @TableField(value = "headimg")
    private String headimg; // 用户头像

    @DateTimeFormat(pattern = "yyyy-MM-dd") // 前台向后台转换
    @TableField(value = "ubirthday")
    private LocalDate ubirthday; // 用户生日

    @TableField(value = "usex")
    private String usex; // 用户性别

    @TableField(value = "uemail")
    private String uemail; // 用户邮箱

    @TableField(value = "ucity")
    private String ucity; // 用户地址

    @TableField(value = "ustatus")
    private String ustatus; // 状态

    @TableField(value = "remark")
    private String remark; // 备注

}
